package com.appkubes.fintech.restful.application.rent.service;


import com.appkubes.fintech.common.response.Response;
import com.appkubes.fintech.core.po.FintechCredit;
import com.appkubes.fintech.core.po.FintechRentOrder;
import com.appkubes.fintech.core.po.FintechRentRepayOrder;
import com.appkubes.fintech.restful.application.pay.common.contract.response.PayModelResponse;
import com.appkubes.fintech.restful.application.pay.common.contract.response.PayQueryResponse;
import com.appkubes.fintech.restful.application.rent.request.RepayBeforeRequest;
import com.appkubes.fintech.restful.application.rent.request.RepayPeriodRequest;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @description: 客户还款Service
 * @author: xqc
 * @date: 2020/1/3 11:39
 * @params:
 * @return:
 */
public interface IRePayService {


//    public FintechCredit recoverCredit(FintechRentOrder order);
    Response<PayQueryResponse> queryPay(String orderId);

    Response<PayModelResponse> doPay(RepayPeriodRequest request, HttpServletRequest servletRequest);

    Response<PayModelResponse> doPay(RepayBeforeRequest request, HttpServletRequest servletRequest);

    void notify(HttpServletRequest request, HttpServletResponse response, String periodType, String payType, String orderNo);

    /**
     * @description: 还款金额
     * @author: xqc
     * @date: 2020/1/2 17:27
     * @params:
     * @return:
     */
    Response repay(Integer amount, String userKey,String billKey,Boolean isBefore);

    public Response repayFirst(String billKey);

    public Response repayPeriod(FintechRentRepayOrder repayOrder, FintechRentOrder rentOrder, String tradePayNo,Boolean isBefore);


    public Response preRePay(FintechRentRepayOrder repayOrder, FintechRentOrder rentOrder, String tradePayNo,Boolean isBefore);


}
